<?php
include("inc/global.inc");
$hover=6;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站留言-<?php if($m_row[ispay]){echo $m_row[m_title2];?><?php }else{?><?php if($m_row[catalog_id3]){echo "$m_row[catalog_3]，";}?><?php if($m_row['catalog_id2']){echo "$m_row[catalog_2]，";}?><?php if($m_row[catalog_id1]){echo "$m_row[catalog_1]，";}?><?=$m_row['m_cname']?><?php if($m_row['catalog_id2']){echo "专业$m_row[catalog_2]产品供应商。";}?><?php }?></title>
<meta name="description" content="网站留言，<?php if($m_row[ispay]){echo $m_row[m_description];?><?php }else{?><?php if($m_row['c_mainpro']){echo $m_row['c_mainpro']."，";}?><?=$m_row['m_cname']?><?php if($m_row['catalog_id2']){echo "专业$m_row[catalog_2]产品供应商。";}?><?php }?>"/>
<meta name="keywords" content="网站留言，<?php if($m_row[ispay]){echo $m_row[m_keywords];?><?php }else{?><?php if($m_row['catalog_id2']){echo "$m_row[catalog_2]，";}?><?php if($m_row[catalog_id1]){echo "$m_row[catalog_1]，";}?><?php if($m_row['c_mainpro']){echo $m_row['c_mainpro']."，";}?><?=$m_row['m_cname']?><?php }?>" />
<link href="/<?=$template?>/css/allcss.css" rel="stylesheet" type="text/css" />
<link href="/css/template.css" rel="stylesheet" type="text/css" />
<link href="/css/top1.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php include("inc/top1.php")?>
<div class="main">
<?php include("inc/top2.php")?>
<div class="ban1">
<div class="flash">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="486" height="194">
    <param name="movie" value="/flash/18.swf" />
    <param name="quality" value="high" />
	<param name="wmode" value="transparent" />
    <embed src="/flash/18.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="486" height="194" wmode="transparent"  value="transparent"></embed>
  </object>
</div>
</div>
<div class="path size11"><a href="/">首页</a> >> 网站留言</div>
<div class="left">
<?php include("inc/left.php")?>
</div>
<div class="ad"></div>
<div class="right">
<div class="rightbox">
  <div class="profile">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="2" class="tables">
<form name="form1" method="post" action="/inquire.php" onSubmit="return check()">
<input name="inquire_subject" type="hidden" value="网站留言">
<input type="hidden" name="inquire_act" value="ok">
        <tr valign="top">
          <td height="30" align="center" valign="middle">留言内容<strong>:</strong></td>
          <td width="88%" height="30" align="left" valign="top"><textarea name="inquire_content" rows="8" cols="50" id="inquire_content"></textarea></td>
        </tr>
      <tr>
      <td height="25" align="right">联系人：</td>
      <td><input name="inquire_name" type="text" size="20" maxlength="20" id="inquire_name" /> <font color="#FF0000">*</font></td>
    </tr>
    <tr>
      <td height="25" align="right">联系电话：&nbsp;</td>
      <td><input name="inquire_tel" type="text" size="20" maxlength="20" id="inquire_tel" /> <font color="#FF0000">*</font></td>
    </tr>
    <tr>
      <td height="25" align="right">邮箱：</td>
      <td><input name="inquire_email" type="text" size="30" maxlength="200" id="inquire_email" /></td>
    </tr>
    <tr>
      <td height="25" align="right">QQ/MSN：</td>
      <td><input name="inquire_qq" type="text" size="25" maxlength="200" id="inquire_qq" /></td>
    </tr>
    <tr>
      <td height="25" align="right">联系地址：</td>
      <td><input name="inquire_addr" type="text" size="40" maxlength="250"  id="inquire_addr"/> <font color="#FF0000">*</font></td>
    </tr>
  <tr>
    <td style="padding-left:35px;">验证码：</td>
    <td><input name="c_code" type="text" class="input" size="8" maxlength="4" id="c_code" />
    &nbsp;&nbsp;<img src="<?php echo SITE_URL;?>inc/code.php" name="img" align="absmiddle" id="img">&nbsp;<a href="#" name="can not see" id="test">刷新</a></td>
  </tr>
        <tr>
          <input type="hidden" name="from_id" value="<?=$n_from_id?>" />
          <td height="55" align="right">　
            <input type="hidden" name="to_id" value="<?=$m_row[id]?>"></td>
          <td height="55" align="left"><input name="submit" type="submit" class="button" value="发送" /></td>
        </tr>
      </form>
    </table>
</div>
<br />
<br />
<br />
<br />
<br />
<br />
    </div>
</div>
<div class="onl"></div>
</div>
<?php include("inc/foot.php");?>
</body>
</html>

<script language="javascript">
function $(id){
return document.getElementById(id);
}

function check(){
if($("inquire_content").value==""){
alert("留言内容不能为空");
$("inquire_content").focus();
return false;
}
if($("inquire_name").value==""){
alert("请留下您的姓名");
$("inquire_name").focus();
return false;
}
if($("inquire_tel").value==""){
alert("请留下您的电话或手机");
$("inquire_tel").focus();
return false;
}

if($("inquire_addr").value==""){
alert("请留下您的联系地址");
$("inquire_addr").focus();
return false;
}
if($("c_code").value==""){
alert("验证码不能为空");
$("c_code").focus();
return false;
}
}

function test(img){
    var src=img.getAttribute("src");
    src=src+"?new="+Math.random(0,10);
    img.setAttribute("src",src);
}
function prepare(){
    var nav=document.getElementById("test");
    var name=nav.getAttribute("name");
    var str="can not see";
    if(name==str){
        nav.onclick=function(){
            var img=document.getElementById("img");
            test(img);
            return false;
        }
    }
}
window.onload=prepare;
</script>